package com.iqik.sc.ns.service;

import com.iqik.sc.ns.service.fallback.AuthCodeServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "service-code", fallback = AuthCodeServiceFallback.class, path = "/code")
public interface AuthCodeService {
    @RequestMapping("/create/{email}")
    String createCode(@PathVariable(value = "email") String email);

    @RequestMapping("/validate/{email}/{code}")
    String verityCode(@PathVariable(value = "email") String email,
                             @PathVariable(value = "code") String code);
}
